package com.huawei.fastengine.fastview;

import java.util.ArrayList;
import java.util.List;

public class FastViewInstanceGroup {
    List<FastViewInstance> instances = new ArrayList();

    public void add(FastViewInstance fastViewInstance) {
        this.instances.add(fastViewInstance);
    }

    public void onDestroy() {
        for (FastViewInstance onDestroy : this.instances) {
            onDestroy.onDestroy();
        }
    }

    public void onPause() {
        for (FastViewInstance onPause : this.instances) {
            onPause.onPause();
        }
    }

    public void onResume() {
        for (FastViewInstance onResume : this.instances) {
            onResume.onResume();
        }
    }

    public void onStart() {
        for (FastViewInstance onStart : this.instances) {
            onStart.onStart();
        }
    }

    public void onStop() {
        for (FastViewInstance onStop : this.instances) {
            onStop.onStop();
        }
    }

    public void remove(FastViewInstance fastViewInstance) {
        this.instances.remove(fastViewInstance);
    }
}
